package com.njegovanobradovic.icet.pages;

import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Request;

import com.njegovanobradovic.icet.facade.Controller;
/**
 * Start page of application icet.
 */
public class Index {
	@Inject
	private Controller controller;
	@Inject
	private Request request;

	public Object onActivate() {
		controller.setRequest(request);
		return controller.isLoggedIn() ? Home.class : Signin.class;
	}
}
